package com.cs2.volunteerpostbackend.service;

import com.cs2.volunteerpostbackend.po.Image;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.net.URL;
import java.util.List;

public interface ImageService {
    Image saveImage(MultipartFile imageFile, String posterId, String momentId) throws IOException;
    List<Image> saveImages(List<MultipartFile> imageFiles, String posterId, String momentId) throws IOException;
    void saveMomentImageRelation(String momentId, String imageId);
    List<Image> getImagesByMomentId(String momentId);
    
    // 新增从URL下载图片的方法
    Image downloadImageFromUrl(String imageUrl, String posterId, String momentId) throws IOException;
}